<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .outer{
           
            height: 500px;
            border-bottom :10px black solid ;
            margin: 50px auto;
            overflow: hidden;

        }
        .outer div{
            float: left;
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background-color: #bfa;
            animation: ball 2s forwards ease-in  infinite;
        }

        .outer .box2{
            background-color: red;
            animation-delay: 0.2s;
        }
        .outer .box3{
            background-color: rgb(123, 211, 106);
            animation-delay: 0.3s;
        }
        .outer .box4{
            background-color: rgb(94, 44, 231);
            animation-delay: 0.1s;
        }
        .outer .box5{
            background-color: rgb(175, 248, 5);
            animation-delay: 0.15s;
        }
        .outer .box6{
            background-color: rgb(241, 227, 227);
            animation-delay: 0.25s;
        }
        .outer .box7{
            background-color: rgb(241, 19, 112);
            animation-delay: 0.22s;
        }
        .outer .box8{
            background-color: rgb(19, 152, 241);
            animation-delay: 0.27s;
        }

        .outer .box9{
            background-color: rgb(26, 235, 106);
            animation-delay: 0.17s;
        }


        /* 创建小球的下落效果
         */
         @keyframes ball {
             from{
                 margin-top: 0;

             }

             20%,60%,to{
                 margin-top: 400px;
                 animation-timing-function: ease-in;
             }

            40%{
                 margin-top: 100px;
             }
             80%{
                 margin-top: 200px;
             }

             
         }
    </style>
</head>

<body>

    <div class="outer">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
        <div class="box4"></div>
        <div class="box5"></div>
        <div class="box6"></div>
        <div class="box7"></div>
        <div class="box8"></div>
        <div class="box9"></div>
    </div>
</body>

</html>